Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

283
Views
Why is "Window.open" not working when I click the button?

I am trying to open an HTML file with a button. Here is my code:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="styleset.css">
        <link rel="icon" type="image/x-icon" href="favicon.ico">
        <title>example</title>
    </head>
    <body>
         <header>
             <div class="selectoff head">
                 <img src="example.png" alt="Favicon/Logo" id="imgh">
                 <h1 id="h1h">example</h1>
             </div>
         </header>
         <br>
         <div class="center lhalf selectoff">
             <br>
             <h1>example</h2>
             <button type="button" id="example" onclick="Window.open('list.html','_blank')">c\Lorem ipsum dolor sit amet</button>
         </div>
    </body>
</html>

The error that showed up was:

11
index.html:21 Uncaught TypeError: Window.open is not a function
    at HTMLButtonElement.onclick (index.html:21:103)

I've tried to search for any other mention of Window.open() but the button was the only reference.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It's window.open(), with no capital W.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!